<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <title>登录</title>
    <link rel="stylesheet" href="/css/newStyle.css"/>
    <style type="text/css">
        body{
            font-family: "Microsoft YaHei";
        }
        #login{
            width: 900px;
            height: 720px;
            margin:0 auto;
            background:url(images/login.png);
            position: relative;
        }
        #login_box{
            width: 235px;
            height: 133px;
            position: absolute;
            top:280px;
            left:363px;
        }
        .wrapp{
            width:220px;
            height: 35px;
            border-radius: 5px;
            /*padding:9px 10px 10px 10px;*/
            line-height: 35px;
            background-color: #fff;
            padding-left: 15px;
            margin-bottom: 14px;
        }
        .wrapp span{
            width: 15px;
            height: 15px;
            background: url(images/user.png) no-repeat center;
            padding-left: 20px;
        }
        .wrapp span.pwd{
            background: url(images/password.png) no-repeat center;
        }
        .wrapp input{
            border:0;
            height: 18px;
            font-size:14px;
            position: relative;
            top:-1px;
            left:4px;
            outline:none;
        }
        .submit{
            width: 100%;
            height: 35px;
            text-align: center;
            line-height: 35px;
            background-color: #1E95EA;
            border:0;
            border-radius: 5px;
            font-size: 14px;
            color: #fff;
        }
        .sysName{
            color:#fff;
            font-size: 25px;
            text-align: center;
            position: absolute;
            top: 15%;
            left:35%;
        }
        .message{
            color: red;
            font-size: 13px;
            margin-top: 2px;
        }

    </style>
</head>
<script th:inline="javascript">
    var user = [[${#httpServletRequest.remoteUser}]];
    if (user != null){
        window.location.href="/index";
    }
</script>
<body>

<div th:if="${param.logout}">

</div>
<input type="hidden" value = "${#httpServletRequest.remoteUser}" id="a"/>

<div id="login">
    <div class="sysName">监管名录管理系统</div>
    <div id="login_box">
        <form th:action="@{/login}" method="post" >
            <div class="wrapp">
                <span></span>
                <input  name="username" placeholder="用户名" />
            </div>
            <div class="wrapp">
                <span class="pwd"></span>
                <input type="password" name="password" placeholder="密码" />
            </div>
            <input class="submit" type="submit" value="登录"/>
            <div  class="message" th:if="${param.error}">
               请检查用户名或密码
            </div>
        </form>
    </div>
</div>
</body>
</html>